Analyzing user-level data for https://bd-eregistry.dhis2.org/dhis/.
DHIS2 keeps a log of every entry of a data element into a tracker program at the /trackedentitydatavalueaudit API endpoint, including username and timestamp.
With these data, we can analyze user activity with tracker data elements, referred to as edits in tables.
The selected dates for analysis are between * 2014-01-21 * and * 2019-08-14 *
First, check to see that log in is valid.
## [1] "successfully logged in"
We’ve now pulled audit log and some metadata from API.
The TrackedEntityDataValue table shows 36064 UPDATES and 5677 DELETIONS.
An update may be a new data value being entered into a stage, or editing an existing value. A deletion is an erasure of an existing data value.
For simplicity we can refer to these together as edits.
See the DHIS2 developer guide for details.
This table shows all users who entered tracker data by number of deletions and updates.
Now, we can merge this with other metadata
##User Details - Who Enters Tracker Data? Now pull data on user activity from TEI audit log and pull user info from API.
The audit log shows 43 unique program stages with data, entered by 96 unique users.
Overall, 381 users have accounts, and 281 have logged in at least once.
Program stages are listed below, by order of overall number of edits.
Heat map by stage and hour that TEI edits were recorded. Only shows the top 20 stages of edits, all others are grouped as “OTHER”
This shows edits by stage, for all users.
The figure after shows edits by stage and hour, for all users.
The following plot shows all tracker data “edits” during the selected time period. Click and drag over a period to zoom in, and double click to zoom out. Scroll over a time period for edits and date.
An exploration by day of week and time edits occurred
Usage patterns can look very different when down to the user level.
Below is a user who had many tracker interactions within work hours, and one who did not.
In total, 30 different user groups have entered tracker data.
Graph showing top stages by hour for each user group are found at directory C:/Users/Brian/Documents/GitHub/dhis2-user-analysis E.g. at C:/Users/Brian/Documents/GitHub/dhis2-user-analysis/plots/usergroups
Below are the user groups with the most user interactions (“edits”) in tracker.
Graphs showing top stages by hour for each username are found at directory C:/Users/Brian/Documents/GitHub/dhis2-user-analysis/plots/users
Below are the usernames with the most freqent user interactions (“edits”) in tracker.
Here we convert the TEI audit log to show time between first and last auditted change. this should give a sense of quality as well.
We define a “session” as one or more auditted changes to an event by a single user in a calendar month. The session length is the time spent on this event in seconds.
The next section considers each stage by median session duration, number of sessions, and number of overall edits.
For clarity, only stage-sessions of 1-10 minutes in length are analyzed, and only the stages in the top 10 session count are plotted.
We can get the same details by user. A user with sessions that are too long may require more training.
Here we get a simple listing of events where multiple users editted the same stage.
3 events had multiple users submit data. This may be evidence of data tampering!
You can search for these event UIDs through the API for more details.